#ifndef SHIFT_REGISTER_H
#define SHIFT_REGISTER_H

#include "Node.h"

//Shift Register acts like a really weird Node
//constructor: the source value is created
//and the loop entry terminal is added to it
//and the source is propagated
//process: When it's processed it adds the sink value to it's phi node
//and copies it's value to the loop exit terminal
//weird, huh?

class ShiftRegister : public Node {
 public:
  ShiftRegister(DoWhile* parent, SourceTerminal* entryTerminal, SourceTerminal* exitTerminal);

  void process(llvm::IRBuilder<> *builder);
 private:
  SourceTerminal* exitTerminal;
};

#endif
